import request from '@/utils/request'

// 青运-安全生产先进集体申报 VO
export interface SafetyAdvancedGroupApplicationVO {
  id: number // 主键编号
  processInstanceId:string
  reportingUnit: string // 填报单位
  applicationDate: string|number // 时间
  groupName: string // 集体名称
  company: string // 所属企业
  employeeCount: number // 职工人数
  groupLeaderName: string // 集体负责人姓名
  mainAchievements: string // 主要事迹
  safetyCommitteeOpinion: string // 集团公司安委会意见
  stamp: string // 签章
  approvalDate: Date // 审批时间
  startUserSelectAssignees:any
  status:number,
  isApproved: any
   [key: string]: any
}

// 青运-安全生产先进集体申报 API
export const SafetyAdvancedGroupApplicationApi = {
  // 查询青运-安全生产先进集体申报分页
  getSafetyAdvancedGroupApplicationPage: async (params: any) => {
    return await request.get({ url: `/bpm/safety-advanced-group-application/page`, params })
  },

  // 查询青运-安全生产先进集体申报详情
  getSafetyAdvancedGroupApplication: async (id: number) => {
    return await request.get({ url: `/bpm/safety-advanced-group-application/get?id=` + id })
  },

  // 新增青运-安全生产先进集体申报
  createSafetyAdvancedGroupApplication: async (data: SafetyAdvancedGroupApplicationVO) => {
    return await request.post({ url: `/bpm/safety-advanced-group-application/create`, data })
  },

  // 修改青运-安全生产先进集体申报
  updateSafetyAdvancedGroupApplication: async (data: SafetyAdvancedGroupApplicationVO) => {
    return await request.put({ url: `/bpm/safety-advanced-group-application/update`, data })
  },

  // 删除青运-安全生产先进集体申报
  deleteSafetyAdvancedGroupApplication: async (id: number) => {
    return await request.delete({ url: `/bpm/safety-advanced-group-application/delete?id=` + id })
  },

  // 导出青运-安全生产先进集体申报 Excel
  exportSafetyAdvancedGroupApplication: async (params:any) => {
    return await request.download({ url: `/bpm/safety-advanced-group-application/export-excel`, params })
  },
}
